package com.xbongbong.paas.util;

import com.xbongbong.paas.enums.NodeTypeEnum;
import com.xbongbong.paas.enums.TaskTypeEnum;
import com.xbongbong.workflow.domain.entity.WorkflowTaskNodeEntity;

/**
 * @author 吴峰
 * @date 2022/08/23 10:17
 */
public class WorkflowTaskUtil {


    /**
     * Description: 判断是不是审批开始节点
     * @param workflowTaskNodeEntity
     * @return boolean
     * @throws
     * @author 魏荣杰
     * @date 2021/5/24 10:48
     * @since
     */
    public static boolean isCreateTaskNode(WorkflowTaskNodeEntity workflowTaskNodeEntity) {
        return (TaskTypeEnum.COMMIT.getType().equals(workflowTaskNodeEntity.getTaskType()) || TaskTypeEnum.REVOKE.getType().equals(workflowTaskNodeEntity.getTaskType())) && NodeTypeEnum.START_PROCESS_NODE.getNodeType().equals(workflowTaskNodeEntity.getNodeType());
    }
}
